/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package oids.frontEnd.util;

import oids.frontEnd.components.Component;

/**
 *
 * @author CJ
 */
public class CollisionDetector {

    public static boolean detectCollisions(Component a, Component b){
        if(Math.sqrt(Math.pow(a.getX() - b.getX(), 2) + Math.pow(a.getY() - b.getY(), 2)) < a.getSize() + b.getSize())
                return true;
        return false;
    }

}
